<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
    <style>
        .active{
            border:1px solid red;
            width: 100px;
            height: 100px;
        }
        .error{
            background-color: orange;
        }
    </style>
</head>
<body>
    <div id="app">
        <div v-bind:class="[activeClass,errorClass]">测试样式</div>
        <button v-on:click="handle">切换</button>
    </div>
    <script>
        var vm = new Vue({
            el:"#app",
            data:{
                activeClass:'active',
                errorClass:'error'
            },
            methods:{
                handle:function(){
                    this.activeClass="";
                  
                }
            }
        })
    </script>
</body>
</html>